package com.wx.frame.serviceimpl;

import com.wx.frame.mapper.RolesMenuMapper;
import com.wx.frame.service.RolesMenuService;
import com.wx.utils.Page;
import com.wx.utils.Pageable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by myd on 16/4/5.
 */
@Service("rolesMenuServiceImpl")
public class RolesMenuServiceImpl<RolesMenu> implements RolesMenuService<RolesMenu> {

    @Autowired
    public RolesMenuMapper<RolesMenu> rolesMenuMapper;


    /**
     * 获取所有的数据
     * @param rolesMenu
     *
     * @return
     */
    @Override
    public List<RolesMenu> getAll(RolesMenu rolesMenu)
    {
        return this.rolesMenuMapper.getall(rolesMenu);
    }

    /**
     * 保存权限信息
     */
    @Override
    public int save(RolesMenu rolesMenu)
    {
        return this.rolesMenuMapper.save(rolesMenu);
    }

    /**
     * 删除权限信息，支持批量删除
     * @param idList
     */
    @Override
    public int delete(List<String> idList) {
        return this.rolesMenuMapper.delete(idList);
    }

    @Override
    public Page<RolesMenu> findPage(Pageable pageable, RolesMenu entity) {
        return null;
    }
}
